﻿using System.IO;

namespace LibraryGuard.Interfaces
{
	/// <summary>
	/// Interface for guard options.
	/// </summary>
	public interface IGuard
	{
		/// <summary>
		/// Indicates whether guard wants to care about all extension in <see cref="FileSystemEvent"/> or not.
		/// If this is true, directories will be excluded.
		/// </summary>
		bool OnlySpecificExtensions { get; }

		/// <summary>
		/// Action list.
		/// Should be set before <see cref="Run"/> will be called.
		/// </summary>
		IActionList ActionList { get; set; }

		/// <summary>
		/// Runs guard.
		/// Can be both synchornous or asynchronous.
		/// </summary>
		void Run();

		/// <summary>
		/// Occurs when continuous mode is enabled and file system event was raised.
		/// If guard wants to support continuous checks should handle the event.
		/// </summary>
		/// <param name="args"></param>
		/// <param name="baseDirectory"></param>
		void FileSystemEvent(FileSystemEventArgs args, string baseDirectory);
	}
}
